package info.hexin.mvc.config;

import info.hexin.mvc.annotation.Method;
import info.hexin.mvc.methodtree.MethodInfo;
import info.hexin.mvc.methodtree.UrlNode;


/**
 * 将配置的action 对应起来
 * 
 * @author ydhexin@gmail.com
 * 
 */
public class UrlMaping {

    private static UrlNode root = new UrlNode();

    public static void addMethodInfo(MethodInfo methodInfo) {
        root.addMethod(methodInfo);
    }

    public static MethodInfo getMethod(String requestURI, Method method) {
        return root.getUrl(requestURI, method);
    }
}
